//导入封装好的axios(封装好的ajax) -request
import request from '@/utils/request'
import vi from "element-ui/src/locale/lang/vi";
//定义接口
export default {
  /**
   * 添加小节
   * @param video
   * @returns {*}
   */
  addVideo(video) {
    return request({
      url: '/edu/video/addVideo',
      method: 'post',
      data: video
    })
  },
  /**
   * 更新小节
   * @param video
   * @returns {*}
   */
  updateVideo(video) {
    return request({
      url: '/edu/video/updateVideo',
      method: 'post',
      data: video
    })
  },
  /**
   * 删除小节
   * @param id
   * @returns {*}
   */
  deleteVideo(id) {
    return request({
      url: '/edu/video/delete/' + id,
      method: 'delete'
    })
  },
  /**
   * 根据id查询video
   * @param videoId
   */
  getVideo(videoId) {
    return request({
      url: '/edu/video/' + videoId,
      method: 'get'
    })
  },
  /**
   * 根据视频id删除用户
   * @param id
   * @returns {*}
   */
  removeVideoId(id) {
    return request({
      url: '/ali/oss/fileoss/removeAlyVideo/' + id,
      method: 'delete'
    })
  }

}
